package com.ctgu.tengyun.bean.errorcode;

import com.ctgu.tengyun.exception.ErrorCodeInterface;

/**
 * Created by liaoweizhi on 2019/7/19.
 */
public enum UserErrorCode implements ErrorCodeInterface {

    success(0, "success", "成功"),
    old_password_invalid(1012,"old password invalid","原密码不正确"),
    password_too_short(1011,"password too short","密码不少于6位"),
    username_is_exist(1010,"user is exist","用户名已存在"),
    token_error(1009,"token error","token无效"),
    api_user_info_not_init(1008,"api user info not init","用户不存在"),
    not_exist(1004, "user not exist", "用户不存在"),
    name_or_pass_error(1003, "name or pass error", "账号或密码错误"),
    limited(1002, "user limited", "用户受限"),
    ;

    private Integer errorCode;

    private String msg;

    private String hintMessage;

    UserErrorCode(Integer errorCode, String msg, String hintMessage){
        this.errorCode = errorCode;
        this.msg = msg;
        this.hintMessage = hintMessage;
    }

    @Override
    public Integer getErrorCode() {
        return errorCode;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public String getHintMessage() {
        return hintMessage;
    }
}
